/*
 * @(#)RoleUtils.java 2009-3-27
 * 
 * Copyright 5jxiang . All rights reserved.
 */
package com.jz.util;


/**
 * <p>
 * <a href="RoleUtils.java.html"><i>View Source</i></a>
 * </p>
 *
 * @author 5jxiang
 * @version $Id$
 */
public class RoleUtils {
	
	public static final String ADMIN_ROLE = "admin";
	public static final String MANAGER_ROLE = "manager";
	public static final String CS_ROLE = "cs";
	public static final String FREE_ROLE = "free";
	public static final String GUEST_ROLE = "guest"; //
	public static final String SEP = " ";
	
	public static int getRoleRank(String roleName) {
		if ("admin".equals(roleName)) 
			return 10;
		else if ("manager".equals(roleName)) 
			return 8;
		else if ("cs".equals(roleName)) 
			return 5;
		else if ("free".equals(roleName)) 
			return 1;
		return 0;
	}
	
	
	
}
